Summary of Geometric Styles
Constants and Data Types
Style Attributes
enum gxStyleAttributes { gxCenterFrameStyle = 0, /* center the pen on contour */ gxSourceGridStyle = 0x0001, /* constrain to source grid */ gxDeviceGridStyle = 0x0002, /* constrain to device grid */ gxInsideFrameStyle = 0x0004, /* place pen inside contour */ gxOutsideFrameStyle = 0x0008, /* place pen outside contour */ gxAutoInsetStyle = 0x0010 /* don't assume right is in */ }; typedef long gxStyleAttribute;Cap Structure
struct gxCapRecord { gxCapAttribute attributes; /* modifies behavior of caps */ gxShape startCap; /* shape to use at start of contours */ gxShape endCap; /* shape to use at end of contours */ };Cap Attributes
enum gxCapAttributes { gxLevelStartCap= 0x0001; /* suppress start cap rotation */ gxLevelEndCap = 0x0002; /* suppress end cap rotation */ }; typedef long gxCapAttribute;Join Structure
struct gxJoinRecord { gxJoinAttribute attributes; /* modifies behavior of joins */ gxShape join; /* shape to use at corners */ Fixed miter; /* size limit for sharp joins */ };Join Attributes
enum gxJoinAttributes { gxSharpJoin = 0x0000, /* use default sharp joins */ gxCurveJoin = 0x0001, /* use default curved joins */ gxLevelJoin = 0x0002 /* suppress join shape rotation */ }; typedef long gxJoinAttribute;Dash Structure
struct gxDashRecord { gxDashAttribute attributes; /* modifies behavior of dashes */ gxShape dash; /* shape used for dashing */ Fixed advance; /* distance between dashes */ fract phase; /* start offset into the contour */ Fixed scale; /* height of dash (mapped to pen) */ };Dash Attributes
typedef enum gxDashAttributes { gxBendDash = 0x0001; /* distorts shape in 1 dimension */ gxBreakDash = 0x0002; /* places dash contours separately */ gxClipDash = 0x0004; /* clips dashes to pen width */ gxLevelDash = 0x0008; /* suppresses dash rotation */ gxAutoAdvanceDash = 0x0010; /* automatically adjusts advances */ }; typedef long gxDashAttribute;Pattern Structure
struct gxPatternRecord { gxPatternAttribute attributes; /* modifies behavior of pattern */ gxShape pattern; /* shape to use as pattern */ gxPoint u; /* vector for pattern grid */ gxPoint v; /* vector for pattern grid */ };Pattern Attributes
enum gxPatternAttributes { gxPortAlignPattern = 0x0001, /* align pattern with device */ gxPortMapPattern = 0x0002 /* suppress mapping of pattern */ }; typedef long gxPatternAttribute;Functions for Manipulating Geometric Style Properties
Getting and Setting Style Attributes
gxStyleAttribute GXGetStyleAttributes (gxStyle source); void GXSetStyleAttributes (gxStyle target, gxStyleAttribute attributes); gxStyleAttribute GXGetShapeStyleAttributes (gxShape source); void GXSetShapeStyleAttributes (gxShape target, gxStyleAttribute attributes);Getting and Setting Curve Error
Fixed GXGetStyleCurveError (gxStyle source); void GXSetStyleCurveError (gxStyle target, Fixed error); Fixed GXGetShapeCurveError (gxShape source); void GXSetShapeCurveError (gxShape target, Fixed error);Getting and Setting the Pen Width
Fixed GXGetStylePen (gxStyle source); void GXSetStylePen (gxStyle target, Fixed pen); Fixed GXGetShapePen (gxShape source); void GXSetShapePen (gxShape target, Fixed pen);Getting and Setting Caps
gxCapRecord *GXGetStyleCap (gxStyle source, gxCapRecord *cap); void GXSetStyleCap (gxStyle target, const gxCapRecord *cap); gxCapRecord *GXGetShapeCap (gxShape source, gxCapRecord *cap); void GXSetShapeCap (gxShape target, const gxCapRecord *cap);Getting and Setting Joins
gxJoinRecord *GXGetStyleJoin (gxStyle source, gxJoinRecord *join); void GXSetStyleJoin (gxStyle target, const gxJoinRecord *join); gxJoinRecord *GXGetShapeJoin (gxShape source, gxJoinRecord *join); void GXSetShapeJoin (gxShape target, const gxJoinRecord *join);Getting and Setting Dashes
gxDashRecord *GXGetStyleDash (gxStyle source, gxDashRecord *dash); void GXSetStyleDash (gxStyle target, const gxDashRecord *dash); gxDashRecord *GXGetShapeDash (gxShape source, gxDashRecord *dash); void GXSetShapeDash (gxShape target, const gxDashRecord *dash); long GXGetShapeDashPositions (gxShape source, gxMapping dashMappings[]);Getting and Setting Patterns
gxPatternRecord *GXGetStylePattern (gxStyle source, gxPatternRecord *pattern); void GXSetStylePattern (gxStyle target, const gxPatternRecord *pattern); gxPatternRecord *GXGetShapePattern (gxShape source, gxPatternRecord *pattern); void GXSetShapePattern (gxShape target, const gxPatternRecord *pattern); long GXGetShapePatternPositions (gxShape source, gxPoint positions[]);
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help